Hello!
Module linkMod
string linkModNameWithPath = path(targetMod) "//" linkPurpose
if(!null current Module )
{
previousCurrentModule = current Module
openedPrevious = true
}
string moduledescription = "Automatisch generiert durch: Zielspezifikation erstellen"
if(exists (module linkModNameWithPath) == true)
{
infoBox "Das Linkmodul " linkPurpose " existiert bereits."
linkMod = edit ( linkPurpose )
linkMod = current
}//if - Linkmodul existiert bereits: Linkmodul oeffnen
else
{
linkMod = create(linkModNameWithPath , moduledescription , manyToMany, true)
current = linkMod
}//else - neues Linkmodul erstellen
if(exists (module linkModNameWithPath) == true)
returns true, even there is allready a link module with the specified name in the specified folder. So the create-command returns an error (wich is correct, of course). SystemAdmin - Tue May 04 11:23:57 EDT 2010 |
Re: Checking for existing of a module in a specified folder On other news... Your exists function is returning false. Your <linkMod = current> statement is redundant, and possibly an error, since I don't think the link module is current if its already open Edit. Your attempt to maintain the current module is admirable, but worthless. Routinely do it this way: Module mCurr = current() Do stuff, open modules, etc if (!null mCurr) current = mCurr
Strangely, even after all these years, I still have to think about which slash needs to be double. I type this: "\n" which I can do in my sleep, and then determine its this slash that's double \, then delete what I just typed in. |
Re: Checking for existing of a module in a specified folder thanks for your answer! I tried the "/"-Seperator, and now my script works quite fine. The thing you mentioned about dealing with the current module was quite helpfull too! |